#include "base_string.h"

#include <string>
#include <vector>

namespace El {
namespace Base {
void Split(const std::string &input, const std::string &delimiter, std::vector<std::string> &result)
{
    size_t start = 0;
    size_t end = input.find(delimiter);
    while (end != std::string::npos) {
        result.push_back(input.substr(start, end - start));
        start = end + delimiter.length();
        end = input.find(delimiter, start);
    }
    result.push_back(input.substr(start, end));
}
} // namespace Base
} // namespace El